﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace Class_KetNoi
{
    public class KetNoiCoSoDuLieu
    {
      public  SqlConnection cnn = new SqlConnection("Data Source=(local);Initial Catalog=QuanLyNhanVien;Integrated Security=true");
      public void connect()
      {
          cnn.Open();

      }
      public void disconnect()
      {
          cnn.Close();
      }
      public DataTable taobang(string sql)
      {
          SqlCommand cmd = new SqlCommand();
          SqlDataAdapter da = new SqlDataAdapter(sql,cnn);
          DataTable dt = new DataTable();
          da.Fill(dt);
          return dt;
      }

    }
}
